package com.pay.alipay.controller;

import com.pay.alipay.pojo.Order;
import com.pay.alipay.service.OrderService;
import com.pay.alipay.utils.BaseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/order")
public class OrderController {
    @Autowired
    private OrderService orderService;

    @GetMapping("/list")
    public BaseResult list(){
        List<Order> list=orderService.list();
        return BaseResult.success(list);
    }
}
